<%@ page import="java.util.ArrayList" %>
<%@ page import="com.wdg.pojo.Reg_user" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2025/3/16
  Time: 20:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div align="center">
    <h3>查看用户列表（ArrayList方式）</h3>
    <table border="1">
        <tr>
            <th>姓名</th>
            <th>密码</th>
            <th>年龄</th>
        </tr>
        <%
            ArrayList<Reg_user> lists = (ArrayList<Reg_user>) request.getAttribute("lookList");
            for (int i = 0; i < lists.size(); i++) {
                Reg_user u = lists.get(i);
        %>
        <tr>
            <td><%=u.getUser()%>
            </td>
            <td><%=u.getPw()%>
            </td>
            <td><%=u.getAge()%>
            </td>
        </tr>
        <%
            }
        %>
    </table>
</div>
</body>
</html>
